Docs/Reference

CLI Reference

Complete reference for the decide command-line interface. All commands are also available as decisionnode.

Installation

npm install -g decisionnode

Both decide and decisionnode are installed — they're the same command. decide is just a shorter alias. Every example in this page works with either:

decide add          # short
decisionnode add    # same thing

Core Commands

decide init

Initialize DecisionNode for the current project. Creates the project store in ~/.decisionnode/.decisions/<ProjectName>/.

decide setup

Configure your Gemini API key interactively. Prompts you to paste your key and saves it to ~/.decisionnode/.env.

decide add

Interactively create a new decision. Prompts for scope, decision text, rationale (optional), and constraints (optional). Auto-embeds for search.

decide add -s <scope> -d <decision> [-r <rationale>] [-c <constraints>]

Add a decision in one command, no prompts. Also accepts --scope, --decision, --rationale, --constraints as long flags. Combine with --global for global decisions.

decide add --global

Add a global decision that applies to all projects. Works with both interactive and inline modes.

decide list [--scope <scope>]

List all decisions grouped by scope, including global decisions. Use --scope to filter to a specific scope.

decide list --global

List only global decisions.

decide get <id>

View the full details of a decision by ID. Use global: prefix for global decisions (e.g. global:ui-001).

decide search "<query>"

Semantically search decisions using vector embeddings. Only returns active decisions — deprecated decisions are excluded. Automatically includes global decisions. Requires a Gemini API key.

decide edit <id> [-f]

Interactively edit a decision's text, rationale, and constraints. Supports global: prefix. Use -f or --force to skip global decision confirmation.

decide deprecate <id>

Deprecate a decision — hides it from search but keeps the decision and its embedding. Supports global: prefix.

decide activate <id>

Re-activate a deprecated decision. Immediately searchable again since the embedding is preserved. Supports global: prefix.

decide delete <id> [-f]

Permanently delete a decision and its embedding. Supports global: prefix. Use -f or --force to skip confirmation. Consider deprecating instead if you might want it back.

decide delete-scope <scope> [-f]

Delete an entire scope and all decisions within it. Use -f or --force to skip confirmation.

Data & Maintenance

decide export [format]

Prints decisions to the terminal. Use > to save to a file: decide export json > ~/decisions.json — the file is created wherever you point it. Supported formats: md (default), json, csv.

decide export --global

Same as export but for global decisions only.

decide import <file.json> [--overwrite]

Import decisions from a JSON file into the current project. Pass the path to the file you exported: decide import ~/decisions.json. Use --overwrite to replace existing decisions with the same IDs.

decide import <file.json> --global

Import decisions into the global store instead of the current project.

decide check

Show which decisions are missing vector embeddings and aren't searchable. Covers both project and global decisions.

decide embed

Generate vector embeddings for any unembedded decisions. Run this after importing, or if embedding failed due to a missing API key.

decide clean

Remove orphaned vectors and review metadata that no longer correspond to existing decisions.

decide history [--filter <source>]

View the activity log showing recent adds, edits, deletes, and syncs. Filter by source: cli, mcp, cloud, or marketplace.

decide projects

List all projects with decisions. Shows global decisions separately at the top.

decide config

View current configuration. Subcommands: 'decide config agent-behavior strict|relaxed' to control how the AI uses DecisionNode, 'decide config search-threshold 0.0-1.0' to set minimum similarity score for results.

Global Decisions

Some decisions apply across all projects — things like "always use TypeScript strict mode" or "never commit .env files". These are global decisions, stored in ~/.decisionnode/.decisions/_global/.

decide add --global — create a global decision through the same interactive flow.

decide list --global — list only global decisions. Without this flag, decide list shows both project and global together.

decide search — automatically includes global decisions in results alongside project decisions.

Global decision IDs are prefixed with global: (e.g. global:ui-001). Use this prefix with get, edit, and delete. Editing or deleting a global decision requires extra confirmation since it affects all projects.

If a project decision conflicts with a global one, the project decision takes priority.

Examples

# Interactive add
decide add

# One-command add (no prompts)
decide add -s UI -d "Use Tailwind for all styling" -r "Consistent tokens" -c "No arbitrary values"

# One-command global add
decide add --global -s Security -d "Never commit .env files"

# Search (includes global decisions)
decide search "how should we handle authentication?"

# List, filter, view
decide list --scope Backend
decide list --global
decide get global:ui-001

# Deprecate and re-activate
decide deprecate ui-003
decide activate ui-003

# Export as JSON — file is created at the path you specify
decide export json > ~/my-project-decisions.json

# Check and fix embedding health
decide check
decide embed